import React from "react";
import "./index.scss";
import "@/assets/fonts/icon/iconfont.js";
/**
 * 字体图标
 */
function Icon(props) {
  const { type } = props;
  return (
    <svg className="icon" aria-hidden="true">
      <use xlinkHref={`#icon-${type}`}></use>
    </svg>
  );
}

/**
 *  字体图标
 */
function iconString(type) {
  return `<svg className="icon" aria-hidden="true">
    <use xlink:href='#icon-${type}'></use>
  </svg>`;
}

export default Icon;

export { iconString };
